package com.example.musicrecommend.model.vo;


import com.example.musicrecommend.model.entity.Song;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class SongVO {

    private Long id;

    private String singerName;

    private String name;

    //    private Long tagId;
    private String tags;

    private String url;


    public static Song voToObj(SongVO vo) {
        if (vo == null) {
            return  null;
        }
        Song obj = new Song();
        BeanUtils.copyProperties(vo, obj);
        return obj;
    }


    public static  SongVO objToVo(Song obj) {
        if (obj == null) {
            return null;
        }
        SongVO vo = new SongVO();
        BeanUtils.copyProperties(obj, vo);
        return vo;
    }


}
